DatabaseGetCurSel

 

The 'DatabaseGetCurSel' function returns the index of the selected data of Database object.

 

int @DatabaseGetCurSel(string class_name);

 

Parameters
string class_name : Class name of Database object.

 

Return Value

Index (If the number of data is four[10, 20, 30, 40], the index is as follows:10[index = 0], 20[index = 1], 30[index = 2], 40[index = 3] If any data isn't selected, the index is '-1'.)

 

Example

$AI_0000 = @DatabaseGetCurSel("Database1");

Description : Assume that data of 'Database1' are four[10, 20, 30, 40] and the selected data is '30'. If you excute the above statement, '2'(the index of data '30') is stored in the tag named 'AI_0000'.

 

Relate items)

Database object Example